package kr.ac.kongju.gedl.common.util;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 검색결과정보
 * @author GorillaFunch
 *
 * @param <T>
 */
public class ListResultVO<T> implements Serializable {
	private static final long serialVersionUID = 3769315070936729501L;
	
	public static final String LIST_COUNT = "list_count";
	public static final String LIST = "data_list";
	
	private int listCount = 0;								//총 건수
	private List<T> list = new ArrayList<T>();				//페이지 결과 리스트
	public ListResultVO() {}
	
	public ListResultVO(int listCount, List<T> list) {
		this.listCount = listCount;
		this.list = list;
	}
	
	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		if(list != null)this.list = list;
	}
	public int getListCount() {
		return listCount;
	}
	public void setListCount(int listCount) {
		this.listCount = listCount;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("ListResultVO [list=");
		builder.append(list);
		builder.append(", listCount=");
		builder.append(listCount);
		builder.append("]");
		return builder.toString();
	}
}
